using imitateMacQQ.WebApi.Domain.Login.register.Login.Entity;
using imitateMacQQ.WebApi.Domain.Login.register.Login.Interface;
using imitateMacQQ.WebApi.Domain.Login.register.Login.letter;
using imitateMacQQ.WebApi.Domain.Request.utils;
using Microsoft.AspNetCore.Mvc;

namespace imitateMacQQ.WebApi.Api.Account_register;

[ApiController]
[Route("api/[Controller]/[action]")]
public class RegisterController : ControllerBase
{
    private readonly IRegisterFromInfoResult _registerNewUser;

    public RegisterController(IRegisterFromInfoResult registerNewUser)
    {
        _registerNewUser = registerNewUser;
    }

    [HttpPost]
    public Request<RegisterBackInfo> RegisterAccount(NewRegisterUserInfo dto)
    {
        return _registerNewUser.GetResult(dto);
    }
}